﻿namespace TriangleGames.TrainResEditor
{
    using System;
    using System.Runtime.CompilerServices;
    using UnityEditor;

    public static class DragAndDropManager
    {
        [CompilerGenerated]
        private static System.Type AddAction__BackingField;
        public static DragMode mode;

        public static void Reset()
        {
            mode = DragMode.None;
            DragAndDrop.SetGenericData("移动动作", null);
            DragAndDrop.SetGenericData("添加动作", null);
        }

        public static void SetMode(DragMode newMode)
        {
            mode = newMode;
        }

        public static void Update()
        {
            AddAction = DragAndDrop.GetGenericData("添加动作") as System.Type;
            if (AddAction != null)
            {
                mode = DragMode.AddAction;
            }
            else if (DragAndDrop.GetGenericData("移动动作") != null)
            {
                mode = DragMode.MoveActions;
            }
            else
            {
                mode = DragMode.None;
            }
        }

        public static System.Type AddAction
        {
            [CompilerGenerated]
            get
            {
                return AddAction__BackingField;
            }
            [CompilerGenerated]
            private set
            {
                AddAction__BackingField = value;
            }
        }

        public enum DragMode
        {
            None,
            AddAction,
            MoveActions
        }
    }
}

